package com.ag.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbDeptType entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_DEPT_TYPE", schema = "dbo", catalog = "AGDB")
public class TbDeptType implements java.io.Serializable {

	// Fields

	private String dtId;
	private String dtName;
	private String a;
	private String b;
	private String c;
	private Set<TbUserDept> tbUserDepts = new HashSet<TbUserDept>(0);

	// Constructors

	/** default constructor */
	public TbDeptType() {
	}

	/** minimal constructor */
	public TbDeptType(String dtId) {
		this.dtId = dtId;
	}

	/** full constructor */
	public TbDeptType(String dtId, String dtName, String a, String b, String c,
			Set<TbUserDept> tbUserDepts) {
		this.dtId = dtId;
		this.dtName = dtName;
		this.a = a;
		this.b = b;
		this.c = c;
		this.tbUserDepts = tbUserDepts;
	}

	// Property accessors
	@Id
	@Column(name = "DT_ID", unique = true, nullable = false, length = 4)
	public String getDtId() {
		return this.dtId;
	}

	public void setDtId(String dtId) {
		this.dtId = dtId;
	}

	@Column(name = "DT_NAME", length = 20)
	public String getDtName() {
		return this.dtName;
	}

	public void setDtName(String dtName) {
		this.dtName = dtName;
	}

	@Column(name = "A", length = 60)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 60)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 60)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbDeptType")
	public Set<TbUserDept> getTbUserDepts() {
		return this.tbUserDepts;
	}

	public void setTbUserDepts(Set<TbUserDept> tbUserDepts) {
		this.tbUserDepts = tbUserDepts;
	}

}